package com.mspbots.web.core;


import com.mspbots.api.client.CoreClient;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

import java.util.Map;


@RestController
@RequiredArgsConstructor
@RequestMapping("utilization")
public class UtilizationController {

    private final CoreClient coreClient;

    @GetMapping("listbyweek")
    public Mono listbyweek(@RequestParam Map<String, Object> queryParam) {
        return this.coreClient.get("/utilization/listbyweek", queryParam);
    }

    @GetMapping("/list-id-entrydate")
    public Mono listbyIdAndEntrydate(@RequestParam Map<String, Object> queryParam) {
        return this.coreClient.get("/tenant/user-time-entry/list-id-entrydate", queryParam);
    }

}

